ECHO off

SET MSBUILDVER=v2.0.50727
SET MSBuildToolsPath=%windir%\Microsoft.Net\Framework\%MSBUILDVER%
SET ANTPATH=C:\Program Files\NetBeans 7.0\java\ant\bin

REM Compile the XOWL GMI Compiler
"%MSBuildToolsPath%\MSBuild" /p:Configuration=Release XOWLGMICompiler\XOWLGMICompiler\XOWLGMICompiler.csproj

REM Compile the XOWL GMI Environment
"%ANTPATH%\ant" -buildfile XOWLGMIEnvironment\build.xml jar

REM Create release directory
MD build
ECHO OK

MD build\compiler
COPY XOWLGMICompiler\XOWLGMICompiler\bin\Release\XOWLGMICompiler.exe build\compiler\XOWLGMICompiler.exe
COPY XOWLGMICompiler\XOWLGMICompiler\bin\Release\Hime.Redist.dll build\compiler\Hime.Redist.dll
COPY XOWLGMICompiler\XOWLGMICompiler\bin\Release\log4net.dll build\compiler\log4net.dll


MD build\environment
MD build\environment\lib
MD build\environment\dynlibs
MD build\environment\dynlibs\xerces
MD build\environment\workbenches
MD build\environment\workspace
COPY XOWLGMIEnvironment\dist\XOWLGMIEnvironment.jar build\environment\XOWLGMIEnvironment.jar
COPY XOWLGMIEnvironment\dist\lib\appframework-1.0.3.jar build\environment\lib\appframework-1.0.3.jar
COPY XOWLGMIEnvironment\dist\lib\log4j-1.2.16.jar build\environment\lib\log4j-1.2.16.jar
COPY XOWLGMIEnvironment\dist\lib\swing-worker-1.1.jar build\environment\lib\swing-worker-1.1.jar
COPY XOWLGMIEnvironment\dist\lib\mydoggy-api-1.5.0.jar build\environment\lib\mydoggy-api-1.5.0.jar
COPY XOWLGMIEnvironment\dist\lib\mydoggy-plaf-1.5.0.jar build\environment\lib\mydoggy-plaf-1.5.0.jar
COPY XOWLGMIEnvironment\dist\lib\mydoggy-res-1.5.0.jar build\environment\lib\mydoggy-res-1.5.0.jar
COPY XOWLGMIEnvironment\dist\lib\TableLayout-20050920.jar build\environment\lib\TableLayout-20050920.jar
COPY XOWLGMIEnvironment\dist\lib\XOWLGMIModel.jar build\environment\lib\XOWLGMIModel.jar
COPY XOWLGMIEnvironment\dist\lib\XOWLInterpreter.jar build\environment\lib\XOWLInterpreter.jar
COPY XOWLGMIEnvironment\dist\lib\XOWLModel.jar build\environment\lib\XOWLModel.jar
COPY XOWLInterpreter\libs\xerces\xercesImpl.jar build\environment\dynlibs\xerces\xercesImpl.jar

REM create config file
REM ECHO # path for dynamic libraries>> build\environment\config.ini
REM ECHO libs = dynlibs/>> build\environment\config.ini


REM Stage the build
REM MD build
REM CALL stage-comp.bat  build
REM CALL stage-env.bat  build

REM MD build\syntaxes
REM COPY syntaxes\notepadpp\FunctionalOWL.xml build\syntaxes\FunctionalOWL.xml
REM COPY syntaxes\notepadpp\GMITransform.xml build\syntaxes\GMITransform.xml
REM COPY syntaxes\notepadpp\GMIView.xml build\syntaxes\GMIView.xml